#include "StdAfx.h"
#include <initguid.h>
#include "Poom.h"

CPoom *CPoom::m_pThis = NULL;

CPoom::CPoom(void)
{
    HRESULT hr = m_POutlookApp.CoCreateInstance(CLSID_Application);
    if (SUCCEEDED(hr))
        m_POutlookApp->Logon(NULL);
}

CPoom::~CPoom(void)
{
    if (m_POutlookApp != NULL)
        m_POutlookApp->Logoff();
}

CPoom * CPoom::GetThis(void)
{
    if (m_pThis == NULL)
        m_pThis = new CPoom();

    return m_pThis;
}

void CPoom::DeleteThis(void)
{
    if (m_pThis != NULL)
        delete m_pThis;
}
